import request from '@/utils/request'

// export function getInfo(token) {
//   return request({
//     url: '/vue-admin-template/user/info',
//     method: 'get',
//     params: { token }
//   })
// }

// export function logout() {
//   return request({
//     url: '/vue-admin-template/user/logout',
//     method: 'post'
//   })
// }

// 登录

export function login(data) {
  return request({
    url: 'v1/manage/auth/login',
    method: 'post',
    data
  })
}

// 刷新token

export function getInfo() {
  return request({
    url: 'v1/manage/auth/token/refresh',
    method: 'post'
  })
}

// 退出登录

export function logout() {
  return request({
    url: 'v1/manage/auth/loginout',
    method: 'get'
  })
}

// 修改密码
export function editPassword(data) {
  return request({
    url: 'v1/manage/auth/info/password/update',
    method: 'post',
    data
  })
}

// 疫情列表
export function infoList(params) {
  return request({
    url: 'v1/manage/sars/info/index',
    method: 'get',
    params
  })
}

// 常量

export function formConst() {
  return request({
    url: 'v1/customer/info/form/const',
    method: 'get'
  })
}

// 注册信息列表
export function infoIndex(params) {
  return request({
    url: 'v1/manage/customer/info/index',
    method: 'get',
    params
  })
}

// 注册详情

export function infoShow(params) {
  return request({
    url: 'v1/manage/customer/info/show',
    method: 'get',
    params
  })
}

// 注册信息更新
export function infoUpdate(data) {
  return request({
    url: 'v1/manage/customer/info/update',
    method: 'post',
    data
  })
}

// 导出
export function infoDownload(params) {
  return request({
    url: 'v1/manage/customer/info/download',
    method: 'get',
    params
  })
}

// 注册删除
export function infoDelete(customer_id) {
  return request({
    url: 'v1/manage/customer/info/delete',
    method: 'post',
    data: {
      customer_id
    }
  })
}

// 全市网格检查总体情况表
export function download1() {
  return request({
    url: 'v1/manage/sars/info/download/1',
    method: 'get'
  })
}
